﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using TSqlServer;

public partial class user_user_myself : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
        }
        else
        {
            TUser.CheckUser(this.Page);

            btnSave.Attributes.Add("OnClick", "javascript:return chk();");

            string sid = this.Session["ecrm_uid"].ToString();
            TUser oUser = new TUser(sid);
            oUser.Select();
            bigname0.Text = oUser.BigName;
            bigname.Text = oUser.BigName;
            myintro.Text = oUser.MyIntro;
            if (oUser.MyPic != "")
            {
                mypic.Text = "<img src=\"./pics/" + oUser.MyPic + "\" border=0 width=48 height=48><a href=\"user_pic.aspx\">更换</a>";
            }
            else
            {
                mypic.Text = "<a href=\"user_pic.aspx\">放你的头像上来</a>";
            }
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        string sid = this.Session["ecrm_uid"].ToString();

        TUser oUser = new TUser(sid);
        oUser.BigName = bigname.Text;
        oUser.MyIntro = myintro.Text;
        oUser.Update2();
    }
}
